package unamur.iodass.communication.messages;

import java.util.ArrayList;

public class Catalog extends Message{

	
	private ArrayList<Book> books;

	public Catalog(ArrayList<Book> books) {
		this.books = books;
	}

	public String toString() {
		String str = "";
		for (int i=0; i<books.size(); i++) {
			str += books.get(i).getIsbn() + "\t" + books.get(i).getTitle() + "\t" + books.get(i).getAuthor()+ "\t" + books.get(i).getLanguage() + "\n";
		}
		
		return str;
	}
	
	public ArrayList<Book> getBooks() {
		return books;
	}
	
	public int getSize() {
		return books.size();
	}
}
